﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
public partial class LINQSelect : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<string> name = new List<string>();
        name.Add("zhangwei");
        name.Add("zhangsan");
        name.Add("lisi");
        name.Add("wangwu");
        List<string> email = new List<string>();
        email.Add("zhangwei@163.com");
        email.Add("zhangsan@163.com");
        email.Add("lisi@163.com");
        email.Add("wangwu@163.com");
        var result = from namedata in name
                     from emaildata in email
                     where emaildata.Contains(namedata)
                     select emaildata;
        foreach (var i in result)
        { Label1.Text += i.ToString() + "<br>"; }
    }
}